<?php echo $this->Form->create('Paginate', array('id' => 'paginate', 'url' => $this->request->here(false), 'type' => 'post', 'inputDefaults' => array('label' => false))); ?>                           
<div id="content-header">
    <h1><?php echo __d('system','Question Management');?></h1>
</div>
<div id="breadcrumb">
    <a href="<?php echo $this->Html->url('/admin/')?>" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> <?php echo __d('system','Home');?></a>
    <a href="#" class="current"><?php echo __d('system','List Question');?></a>
</div>
<div class="container-fluid">
<div class="row-fluid">
    <div class="span12">
    <?php         
        echo $this->Session->flash(); 
    ?>
    <?php 
        echo $this->Html->script('ckeditor/ckeditor');
        echo $this->element('toolbar');
    ?>     
        <div class="widget-box">
            <div class="widget-title">
                <span class="icon">
                    <i class="icon-th"></i>
                </span>
                <h5><?php echo __d('system','List of Question');?></h5>
            </div>
            <!--Normal-->
            <div class="widget-content widget-content-two">
                <div class="wd-select">
                    <div class="control-group">
                        <div class="controls wd-farming">
                            <select>
                                <option /><?php echo __d('system','Delete');?>
                            </select>                            
                            <!--<a id="example1" href="#tst"><img alt="example1" src="./example/1_s.jpg" /></a>          -->
                            <!--<div style="display: none;">
                                <div id="tst">
                                    ta day con
                                </div>
                            </div>-->
                            <button class="btn"><?php echo __d('system','Apply');?></button>
                        </div>                        
                    </div>
                </div>
                <table class="table table-bordered data-table table-striped with-check wd-hover-btn">
                    <thead>
                        <tr>
                            <th><input type="checkbox" id="title-table-checkbox" name="title-table-checkbox" /></th>
                            <th> <?php echo  __d('system', 'Name'); ?></th>
                            <th> <?php echo  __d('system', 'Email'); ?></th>
                            <th> <?php echo  __d('system', 'Title'); ?></th>
                            <th> <?php echo  __d('system', 'Status'); ?></th>                                                
                            <th class="wd-fix-width-2" style="min-width: 200px;"><?php echo  __d('system', 'Action'); ?></th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                            $defaultLanguage = Router::defaultLanguage();
                            $_queries = array('continue' => $this->request->here(false));
                        ?> 
                        <?php foreach ($listQuestions as $listQuestion) :?>                                            
                            <tr>
                                <td><input type="checkbox" name="data[Paginate][chk_node_type][]" value="<?php echo $listQuestion['Question']['id'];?>"/></td>            
                                <td>
                                    <a href="<?php echo $this->Html->url(array('plugin'=>'node','controller' => 'node', 'action' => 'edit_management',$listQuestion['Question']['id'], '?' => $_queries));?>"> <?php echo $listQuestion['Question']['name']; ?></a>
                                </td>                                                                                                                                         
                                <td>
                                    <?php echo $listQuestion['Question']['email']; ?>
                                </td>                                                                                         
                                <td>
                                    <?php echo $listQuestion['Question']['address'];?>
                                </td>                        
                                <td>
                                    <?php 
                                        if($listQuestion['Question']['enabled']==1){
                                            echo __d('system','Chấp nhận');
                                        }else{
                                            echo __d('system','Chưa chấp nhận');
                                        }                                        
                                    ?>
                                </td>  
                                <td>
                                    <ul class="wd-link-control">                                        
                                        <li><a href="<?php echo $this->Html->url(array('plugin'=>'node','controller' => 'node', 'action' => 'answer_question',$listQuestion['Question']['id'], '?' => $_queries));?>" class="btn btn-mini"><i class="icon-edit"></i> <?php echo __d('system','Replay & Move');?></a></li>                                                                                
                                        <li><a href="#<?php echo $listQuestion['Question']['id']?>" data-toggle="modal" class="btn btn-mini"><i class="icon-remove"></i> <?php echo __d('system','Delete');?></a></li>                                        
                                    </ul>
                                </td>
                            </tr>
                            <div id="myAlert" class="modal hide">
                                <div class="modal-header">
                                    <button data-dismiss="modal" class="close" type="button">×</button>
                                    <h3><?php echo __d('system','Alert');?></h3>
                                </div>
                                <div class="modal-body">
                                    <p><?php echo __d('system','Are you sure delete');?> “<?php echo $listQuestion['Question']['name']?>”?</p>
                                </div>
                                <div class="modal-footer">
                                    <a data-dismiss="modal" class="btn" href="#"><?php echo __d('system','Cancel');?></a>
                                    <?php echo $this->Html->link('Delete', array('plugin'=>'node','controller' => 'node','action' => 'delete', '?' => array_merge($_queries, array('keys' => array($listQuestion['Question']['id'])))), array('title' => false, 'class' => 'btn btn-danger','data-dismiss='=>'modal')); ?>                        
                                </div>
                            </div>                                                       
                            <?php endforeach?>                        
                    </tbody>
                    <?php foreach ($listQuestions as $listQuestion) : ?> 
                        <div id="<?php echo $listQuestion['Question']['id']?>" class="modal hide">
                            <div class="modal-header">
                                <button data-dismiss="modal" class="close" type="button">×</button>
                                <h3><?php echo __d('system','Alert modal');?></h3>
                            </div>
                            <div class="modal-body">
                                <p><?php echo __d('system','Are you sure delete');?> “<?php echo $listQuestion['Question']['name'];?>”?</p>
                            </div>
                            <div class="modal-footer">
                                <a data-dismiss="modal" class="btn" href="#"><?php echo __d('system','Cancel');?></a>
                                <?php echo $this->Html->link('Delete', array('plugin'=>'node','controller' => 'node','action' => 'delete_multiple', '?' => array_merge($_queries, array('keys' => array($listQuestion['Question']['id']),'model'=>'Question','linkAction'=>'manage_question'))), array('title' => false, 'class' => 'btn btn-danger','data-dismiss='=>'modal')); ?>                        
                            </div>
                        </div>  
                        <?php endforeach?>                    
                </table>

                <div class="wd-select">

                    <div class="control-group">
                        <div class="controls wd-farming">
                            <select>
                                <option /><?php echo __d('system','Delete');?>
                            </select>
                            <button class="btn"><?php echo __d('system','Apply');?></button>
                        </div>
                    </div>
                </div>                                
            </div>
            <!--End-->
            <!--For Info moved-->
            <div class="widget-content widget-content-two">
                <div class="wd-select">
                    <div class="control-group">
                        <div class="controls wd-farming">
                            <span class="lbl-moved"><?php echo __d('system','Thông tin được chia sẻ từ các phòng ban khác');?></span>
                        </div>                        
                    </div>
                </div>
                <table class="table table-bordered data-table table-striped with-check wd-hover-btn">
                    <thead>
                        <tr>                            
                            <th style="width: 215px !important"> <?php echo  __d('system', 'Name'); ?></th>
                            <th> <?php echo  __d('system', 'Email'); ?></th>
                            <th> <?php echo  __d('system', 'Title'); ?></th>                                                
                            <th class="wd-fix-width-2" style="min-width: 200px;"><?php echo  __d('system', 'Action'); ?></th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                            $defaultLanguage = Router::defaultLanguage();
                            $_queries = array('continue' => $this->request->here(false));
                        ?> 
                        <?php foreach ($movelistQuestions as $movelistQuestion) :?>                                            
                            <tr>                                
                                <td>
                                    <a href="<?php echo $this->Html->url(array('plugin'=>'node','controller' => 'node', 'action' => 'edit_management',$movelistQuestion['Question']['id'], '?' => $_queries));?>"> <?php echo $movelistQuestion['Question']['name']; ?></a>
                                </td>                                                                                                                                         
                                <td>
                                    <?php echo $movelistQuestion['Question']['email']; ?>
                                </td>                                                                                         
                                <td>
                                    <?php echo $movelistQuestion['Question']['address'];?>
                                </td>                        
                                <td>
                                    <ul class="wd-link-control">                                        
                                        <li><a href="<?php echo $this->Html->url(array('plugin'=>'node','controller' => 'node', 'action' => 'view_answer_question',$movelistQuestion['Question']['id'], '?' => $_queries));?>" class="btn btn-mini"><i class="icon-edit"></i> <?php echo __d('system','View');?></a></li>                                                                                
                                        <li><a href="#<?php echo $movelistQuestion['Question']['id']?>" data-toggle="modal" class="btn btn-mini"><i class="icon-remove"></i> <?php echo __d('system','Not received');?></a></li>                                        
                                    </ul>
                                </td>
                            </tr>
                            <div id="myAlert" class="modal hide">
                                <div class="modal-header">
                                    <button data-dismiss="modal" class="close" type="button">×</button>
                                    <h3><?php echo __d('system','Alert');?></h3>
                                </div>
                                <div class="modal-body">
                                    <p><?php echo __d('system','Are you sure not received');?> “<?php echo $movelistQuestion['Question']['name']?>”?</p>
                                </div>
                                <div class="modal-footer">
                                    <a data-dismiss="modal" class="btn" href="#"><?php echo __d('system','Cancel');?></a>
                                    <?php echo $this->Html->link('Delete', array('plugin'=>'node','controller' => 'node','action' => 'delete', '?' => array_merge($_queries, array('keys' => array($movelistQuestion['Question']['id'])))), array('title' => false, 'class' => 'btn btn-danger','data-dismiss='=>'modal')); ?>                        
                                </div>
                            </div>                                                       
                            <?php endforeach?>                        
                    </tbody>
                    <?php foreach ($movelistQuestions as $movelistQuestion) : ?> 
                        <div id="<?php echo $movelistQuestion['Question']['id']?>" class="modal hide">
                            <div class="modal-header">
                                <button data-dismiss="modal" class="close" type="button">×</button>
                                <h3><?php echo __d('system','Alert modal');?></h3>
                            </div>
                            <div class="modal-body">
                                <p><?php echo __d('system','Are you sure not received');?> “<?php echo $movelistQuestion['Question']['name'];?>”?</p>
                            </div>
                            <div class="modal-footer">
                                <a data-dismiss="modal" class="btn" href="#"><?php echo __d('system','Cancel');?></a>
                                <?php echo $this->Html->link('Not Received', array('plugin'=>'node','controller' => 'node','action' => 'not_received_question', '?' => array_merge($_queries, array('keys' => array($movelistQuestion['MoveQuestion']['id']),'model'=>'MoveQuestion','linkAction'=>'admin_manage_question'))), array('title' => false, 'class' => 'btn btn-danger','data-dismiss='=>'modal')); ?>                        
                            </div>
                        </div>  
                        <?php endforeach?>                    
                </table>

                <div class="wd-select">

                    <div class="control-group">
                        <div class="controls wd-farming">
                            <select>
                                <option /><?php echo __d('system','Delete');?>
                            </select>
                            <button class="btn"><?php echo __d('system','Apply');?></button>
                        </div>
                    </div>
                </div>                                
            </div>
            <!--End-->
        </div>
    </div>    
</div>
<?php         
    echo $this->Form->hidden('task', array('id' => 'task', 'value' => ''));
    echo $this->Form->end();
?>
<style type="text/css">
    .lbl-moved{text-decoration: underline;text-indent: initial;font-size: 16px;font-weight: bold;}
</style>